const getP = (time) =>
  new Promise((resolve, reject) => {
    setTimeout(() => resolve(time), time);
  });

const arr = [2000, 800, 900, 1100];
Promise.all(arr.map((item) => getP(item)))
  .then((data) => {
    console.log(data);
  })
  .catch((err) => {
    console.log(err);
  });
define('a', ['lodash'], function (_) {
  return {
    str: function () {
      return _.repeat('-----', 10);
    },
  };
});
